 <?php
class customerModel extends Model
{
 
    /**
     * 写入缓存
     */
    public function cate_cache() {
        $artcate_list = array();
        $list = $this->getField('id,name');        
        F('customer_list', $list);
        return $list;
    }

    /**
     * 更新则删除缓存
     */
    protected function _before_write(&$data) {
        F('customer_list', NULL);    
    }

    /**
     * 删除也删除缓存
     */
    protected function _after_delete($data, $options) {
        F('customer_list', NULL);       
    }
    
}